<template>
  <div>
    <h1>Counter: {{ state.count }}</h1>
    <button @click="add">增加</button>
  </div>
</template>

<script setup>
import { defineProps, reactive } from "vue";

defineProps({
  msg: String,
});

const state = reactive({ count: 0 });

const add = () => {
  state.count++;
};
</script>

<style scoped>
div {
  color: #42b983;
}
</style>